package com.ruoyi.system.mapper;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.system.domain.ByOrderEval;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 订单评价Mapper接口
 *
 * @author ruoyi
 * @date 2023-06-15
 */
@Mapper
public interface ByOrderEvalMapper {
    // -------------------进行帮手评价查询----------------------------
    @Select("SELECT a.*,b.avatar FROM `by_order_eval` a,by_wx_user b where a.wx_id = b.id and a.bs_id = #{id} ORDER BY addtime desc LIMIT 0,20")
    public List<JSONObject> getByOrderEvalList(@Param("id") String id);

    /**
     * 查询订单评价
     *
     * @param id 订单评价主键
     * @return 订单评价
     */
    public ByOrderEval selectByOrderEvalById(Long id);

    /**
     * 查询订单评价列表
     *
     * @param byOrderEval 订单评价
     * @return 订单评价集合
     */
    public List<ByOrderEval> selectByOrderEvalList(ByOrderEval byOrderEval);
    public List<ByOrderEval> selectOrderEvalList(ByOrderEval byOrderEval);
    /**
     * 新增订单评价
     *
     * @param byOrderEval 订单评价
     * @return 结果
     */
    public int insertByOrderEval(ByOrderEval byOrderEval);

    /**
     * 修改订单评价
     *
     * @param byOrderEval 订单评价
     * @return 结果
     */
    public int updateByOrderEval(ByOrderEval byOrderEval);

    /**
     * 删除订单评价
     *
     * @param id 订单评价主键
     * @return 结果
     */
    public int deleteByOrderEvalById(Long id);

    /**
     * 批量删除订单评价
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteByOrderEvalByIds(Long[] ids);
}
